﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using F1010DB.Common;
using F1010DB.Entity;
namespace F1010DB.SecurityServices
{
    public class ActiveSecurityCodeServices : SecurityCodeCompare
    {
        private SecurityModel securityModel = null;

        public ActiveSecurityCodeServices()
        {

        }

        public ActiveSecurityCodeServices(SecurityModel securityModel)
        {
            this.securityModel = securityModel;
        }

        public bool isCheckExistUnit()
        {
            return base.checkUnitExist(securityModel.maDonVi);
        }
        public bool chekExistUnitAccountAndActive()
        {
            return checkActiveAccount(securityModel);
        }

        public bool firstTimeBeforeLogin()
        {
            return checkActiveAccount(securityModel);
        }

        public int activeSoftware()
        {
            return activeSoftware(securityModel);
        }
        public DonViMaster getUnitInfo()
        {
            return getDonViInformation(securityModel.maDonVi);
        }
    }
}
